package summative;

import java.util.ArrayList;
import javax.swing.JComponent;

public class ViewList 
{
	ArrayList <JComponent> views;

	public ViewList()
	{
		views = new ArrayList <JComponent>();
	}

	public void addView(JComponent component)
	{
		this.views.add(component);
	}

	public void removeGUI (JComponent view) 
	{
		this.views.remove(view);

	}


	public void update(int type)
	{
		for (JComponent view : this.views) 
		{
			((ViewPanel) view).updateView();		
		}
	}
}
